import request from "@/axios/request";
import url from "@/axios/url";
const { mesUrl, adminUrl } = url();
// 导出url
export const exportUrl = `${mesUrl}mesTrackingCardPrintingHistory/export`;
// 分页查询
export function getList (params = {}) {
  return request({
    url: `${mesUrl}mesTrackingCardPrintingHistory/selectList`,
    method: "get",
    params,
  });
}
// 新增
export function rowCreate (data = {}) {
  return request({
    url: `${mesUrl}mesTrackingCardPrintingHistory`,
    method: "post",
    data,
  });
}
// 修改
export function rowUpdate (data = {}) {
  return request({
    url: `${mesUrl}mesTrackingCardPrintingHistory`,
    method: "put",
    data,
  });
}
// 删除
export function rowDel (id) {
  return request({
    url: `${mesUrl}mesTrackingCardPrintingHistory/${id}`,
    method: "put",
  });
}
// 详情
export function rowDetail (id) {
  return request({
    url: `${mesUrl}mesTrackingCardPrintingHistory/info/${id}`,
    method: "get",
  });
}

// 导入用户
export function importData (data = {}) {
  return request({
    url: `${mesUrl}mesTrackingCardPrintingHistory/import`,
    method: "POST",
    data,
    headers: {
      "Content-Type": "multipart/form-data",
    },
  });
}
// 下载模板
export const downloadTemplateUrl = `${mesUrl}mesTrackingCardPrintingHistory/template`;

// 查询打印类型：0正常打印 1补码打印(数据字典)列表
export function getPrinttypeList () {
  return request({
    url: `${adminUrl}dict/type/printType`,
    method: "get",
  });
}
/* 根据名称打印模板详情 */
export function printTemplateInfoName (data) {
  return request({
    url: `${adminUrl}printTemplate/detailbyName`,
    method: "post",
    data,
  });
}
/* 补打获取详细信息 */
export function regetTrackingMsgList (data) {
  return request({
    url: `${mesUrl}mesTrackingCard/regetTrackingMsgList`,
    method: "post",
    data,
  });
}
